<template>
  <view class="container">
    <view class="common_cell">
      <u-cell-group :border="false" class="common_cell">
        <u-checkbox-group
          v-model="value"
          placement="column"
          @change="radioChange"
        >
          <u-cell
            :border="false"
            :key="index"
            :title="item.label"
            v-for="(item, index) in week"
          >
            <u-checkbox slot="right-icon" :name="item.value" />
          </u-cell>
        </u-checkbox-group>
      </u-cell-group>
    </view>

    <!-- 保存设置 -->
    <!-- <view class="common_save_button">保存设置 </view> -->
  </view>
</template>

  
  <script>
export default {
  components: {},
  data() {
    return {
      // 页面参数
      options: {},
      value: "",
      //   周一周二周三周四周五周六周日
      week: [
        {
          label: "周一",
          value: "1",
        },
        {
          label: "周二",
          value: "2",
        },
        {
          label: "周三",
          value: "3",
        },
        {
          label: "周四",
          value: "4",
        },
        {
          label: "周五",
          value: "5",
        },
        {
          label: "周六",
          value: "6",
        },
        {
          label: "周日",
          value: "7",
        },
      ],
    };
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {},

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {},
  onUnload() {
    const eventChannel = this.getOpenerEventChannel();
    eventChannel.emit("onSelectDayChange", this.value);
  },

  methods: {
    radioChange(_e) {
      console.log("_e", _e);
    },
  },
};
</script>
  
  <style lang="scss" scoped>
uni-page-body {
  height: 100%;
}

page {
  height: 100%;
}
.container {
  background: #f6f7fb;
  height: 100%;

  padding: 0 25.568rpx 25.568rpx 25.568rpx;

  ::v-deep .u-cell__body {
    padding-left: 0px;
    padding-right: 0px;
  }
}
</style>
  